x86: further adjustments to arch_set_info_guest() after c/s 23142:f5e8d152a565
authorJan Beulich <jbeulich@novell.com>
Tue, 17 May 2011 12:55:45 +0000 (13:55 +0100)
committerJan Beulich <jbeulich@novell.com>
Tue, 17 May 2011 12:55:45 +0000 (13:55 +0100)
commit4ba1d9d1ac06a9a14a03ab0882b762533be96b97
tree47cfa9ad52379618793e405b3dc298cf98c74426
parentad06dc009b0e1aee8f1ce7530d5f285d5bf3310b
x86: further adjustments to arch_set_info_guest() after c/s 23142:f5e8d152a565

The adjustments to v->arch.user_regs.eflags and the initialization of
the int80 direct trap must be done earlier (namely before the function
may bail because of inconsistencies between input and stored state on
an already initialised vCPU) so that stored state is consistent, and
for arch_get_info_guest() to not have its eflags related BUG_ON()
triggered.

Further, v->arch.pv_vcpu.ctrlreg[] indices 3 and 1 aren't being kept
up to date while the domain is running, so consistency checks must
instead be done against v->arch.guest_table{,_user}.

Additionally, for 64-bit pv domains, CR1 must also be checked to be
consistent with the kernel mode setting for the vCPU, and the whole
CR1 checking should not be done for 32-bit pv domains.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen/arch/x86/domain.c